
<nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
	<div class="container">

		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#navbar" aria-expanded="false"
				aria-controls="navbar">
				<span class="sr-only">随意论坛</span> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="${request.contextPath}/index">随意论坛</a>
		</div>

		<!--.navbar-collapse -->
<!-- 		<#if Session['user']??>
		 <#assign user=Session['user']>
			<ul class="nav navbar-nav navbar-right">
        	<li class="dropdown">
							 <a href="#" class="dropdown-toggle" data-toggle="dropdown">${user.userName}<strong class="caret"></strong></a>
							<ul class="dropdown-menu">
								<li>
									 <a href="${request.contextPath}/modify">个人信息</a>
								</li>
								<li>
									 <a href="${request.contextPath}/section/my-section">我的帖子</a>
								</li>
								<li>
									 <a href="${request.contextPath}/section/add">发帖</a>
								</li>
								<li>
									 <a href="${request.contextPath}/jobMessage/jobConfig">搞事情</a>
								</li>
								<li class="divider">
								</li>
								<li>
									 <a href="#">信息(0)条</a>
								</li>
								<li class="divider">
								</li>
								<li>
									 <a href="${request.contextPath}/user/loginout">退出</a>
								</li>
							</ul>
						</li>
						<li class="dropdown">
						 <a href="#" onclick="return false;"></a>
						</li>
				</ul>
		<#else>
		<!--div id="navbar" class="navbar-collapse collapse">
			<form id="navbar_login" class="navbar-form navbar-right" role="form">
				<div class="form-group">
					<input placeholder="Username" name="userName" id="userName_login"
						class="form-control" type="text">
				</div>
				<div class="form-group">
					<input placeholder="Password" name="password" id="password_login"
						class="form-control" type="password">
				</div>
				<button type="button" id="login_btn" class="btn btn-success" onclick="login();">登 录</button>
				<a class="btn btn-danger" href="toRegister">注 册</a>
			</form>
			<script type="text/javascript">
				//layer.msg('不开心。。', {icon: 5,time:2000});
				function login(){
					var dataJson = $("#navbar_login").serialize();
					$.ajax({
					    type: "post",
					    dataType: 'json',
					    url: '${request.contextPath}/user/login',
					    data: dataJson,
					    success:function(data){
					    	if(data.status==200){
					    		layer.msg(data.msg, {icon: 1,time:2000});
					    		location.replace(location.href);
						    }else{
						    	/*layer.open({
					     		 	title: '提示',content: data.msg
					    		});  */
						    	//layer.msg(data.msg, {icon: 5,time:2000});
						    	layer.tips(data.msg, '#password_login',{tips: 3});
							}
					    }
					});
				}
			</script>
		</div-->
		</#if>
		<!--/.navbar-collapse -->

	</div>
</nav>
<!-- /.navbar -->